Test Series - Data Structure

Test Number 85/115

Q: Which property should ternary heap hold for execution?
A. Associative
B. Commutative
C. Tree
D. Heap
Solution: Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. So, it should hold all the properties of Heap that is all the levels of the heap has to be filled from left to right.
Q: Should leaves in ternary heap be distributed from left to right.
A. True
B. False
C. ...
D. ...
Solution: Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. So, it should hold all the properties of Heap that is all the levels of the heap has to be filled from left to right.
Q: What is the process of building a ternary heap called?
A. Heapify
B. Hashing
C. Linking
D. Merging
Solution: Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. So, the process of building a ternary heap is known as Heapify.
Q: Which type of data structure is a ternary heap?
A. Array
B. Hash
C. Priority Queue
D. Priority Stack
Solution: Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. It is a priority queue type of data structure that follows all the property of heap.
Q: What is a ternary heap?
A. An array with three elements
B. Linked list with three elements
C. Tree with three children
D. Heap with all nodes having three children
Solution: Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. So, it follows all the property of heap. Therefore, all the nodes in the ternary heap have 3 nodes.
Q: Who invented d-ary heap?
A. Carl Rick
B. Alan Turing
C. Donald Johnson
D. Euclid
Solution: Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. The d-ary heap was invented by Donald Johnson in the year 1975.
Q:  Is the priority queue abstract data type.
A. True
B. False
C. ...
D. ...
Solution: Priority queue is an abstract data type. It is also the extension of the Queue data structure where all the elements have been assigned some priority and on the basis of this priority, the elements are dequeued from the structure.
Q: What is the time complexity for inserting a new item in a ternary heap of n elements?
A. O (log n/ log 3)
B. O (n!)
C. O (n)
D. O (1)
Solution: In order to insert a new item in a ternary heap data structure having n elements, the heap has great efficiency for inserting them. So the time complexity for worst case is found to be O (log n/ log 3).
Q: Is decrease priority operation performed more quickly in a ternary heap with respect to the binary heap.
A. True
B. False
C. ...
D. ...
Solution: Ternary heap is a type of data structure in the field of computer science. It is a part of the Heap data structure family. Due to the swapping process, the decrease priority operation performs more quickly in a ternary heap.
Q: What is the time complexity for decreasing priority of key in a minimum ternary heap of n elements?
A. O (log n/ log 3)
B. O (n!)
C. O (n)
D. O (1)
Solution: In order to decrease the priority of an item in a ternary heap data structure having n elements, the heap has great efficiency for decreasing them. So the time complexity for worst case is found to be O (log n/ log 3). This is due to the upwards swapping process.

You Have Score    /10